/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package simhya.model.store;
import org.nfunk.jep.*;
import java.util.ArrayList;

/**
 *
 * @author Luca
 */
public interface Store {
    public boolean evaluatePredicate(int predicateID);
    public double computeFunction(int functionID);
    public  Predicate addPredicate(String predicate);
    public  Function addFunction(String function);
    public int addVariable(String name, double value);
    public int addParameter(String name, double value);
    public void addExternalPredicate(Predicate p);
    public void addExternalFunction(Function f);
    public void finalizeInitialization();
    public void finalizeVariableInitialization();

    public int getNumberOfVariables();
    public int getNumberOfParameters();
    public int getVariableID(String name);
    public int getParameterID(String name);
    public ArrayList<String> getNameOfAllVariables();
    public ArrayList<String> getNameOfAllParameters();

    public double getVariableValue(int variableID);
    public double getParameterValue(int parameterID);
    public void setVariableValue(int variableID, double value);
    public void setParameterValue(int parameterID, double value);
    

    public Object[] getVariables();
    public Object[] getParameters();
    public Object getVariablesReference();
    public Object getParametersReference();
    public double[] getVariablesValues();
    public double[] getParametersValues();
    public double[] getCopyOfVariablesValues();
    public double[] getCopyOfParametersValues();
    
    public void setAllVariableValues(ArrayList<Double> values);
    public void setAllParameterValues(ArrayList<Double> values);
    public void setAllVariableValues(double[] values);
    public void setAllParameterValues(double[] values);
    public void setAllVariableValues(Object values);
    public void setAllParameterValues(Object values);
    public void setParameterValuesReference(Object values);
    public void setVariableValuesReference(Object values);

    public ArrayList<Integer> getVariableListOfPredicate(int id);
    public ArrayList<Integer> getVariableListOfFunction(int id);

    public void addNewFunctionDefinition(String funcName,ArrayList<String> funcParams, String funcDef);

    public String getVariablesRepresentation();

    public void newEvaluationRound();

}
